// 指标表

package dbModel

import "time"

type Quota struct {
	Id                 string    `json:"id" gorm:"primary_key; column:id;type:varchar(255)"`
	Name               string    `json:"name" gorm:"column:name; type:varchar(255)" validate:"required"`
	Level              int       `json:"level" gorm:"column:level; type:int" validate:"required"`
	EvaluationCriteria string    `json:"evaluationCriteria" gorm:"column:evaluation_criteria; type:text"`
	EvaluationLevel    string    `json:"evaluationLevel" gorm:"column:evaluation_level; type:text"`
	EvaluationScore    *int      `json:"evaluationScore" gorm:"column:evaluation_score; type:int"`
	Note               string    `json:"note" gorm:"column:note; type:text"`
	TemplateId         string    `json:"templateId" gorm:"column:template_id; type:varchar(255)" validate:"required"`
	ParentQuotaId      string    `json:"parentQuotaId" gorm:"column:parent_quota_id; type:varchar(255)"`
	CreateTime         time.Time `json:"-" gorm:"column:create_time; autoCreateTime"`
	UpdateTime         time.Time `json:"-" gorm:"column:update_time; autoUpdateTime"`
}

// 数据表
func (*Quota) TableName() string {
	return "quota"
}
